/*
 * @文件描述:
 * @版本:
 * @作者:周晨阳
 * @Date:2021-10-11 19:28:22
 */
#ifndef PUBLIC_H
#define PUBLIC_H

#define BOARD_W806 10
#define BOARD_STM32 20

#define BOARD_ESP8266 30
#define BOARD_STM32_C8T6 40
//用全局宏定义来设置开发板型号，WIN32用于仿真
//#define BOARD_INUSE BOARD_STM32_C8T6
#ifdef USE_STM32_ZET6
#define BOARD_INUSE BOARD_STM32
#endif

#ifdef USE_STM32_C8T6
#define BOARD_INUSE BOARD_STM32_C8T6
#endif

#ifdef USE_W806
#define BOARD_INUSE BOARD_W806
#endif

#ifdef USE_ESP8266
#define BOARD_INUSE BOARD_ESP8266
#endif

#ifdef WIN32
#define BOARD_INUSE WIN32
#endif //  WIN32

#if BOARD_INUSE == BOARD_W806
#include "wm_hal.h"
typedef unsigned char u8;
typedef unsigned int u16;
typedef unsigned long u32;
typedef unsigned char uint8;
typedef unsigned int uint16;
typedef unsigned long uint32;
typedef char int8;
typedef int int16;
typedef long int32;

#define ENABLE 1
#define DISABLE 0
#define TRUE 1
#define FALSE 0
#define bool u8
#define BOOL u8
#define true 1
#define false 0
#define ON 1
#define OFF 0
#define OK 1

#elif BOARD_INUSE == BOARD_STM32 || BOARD_INUSE == BOARD_STM32_C8T6

#define NULL ((void *)0)
typedef unsigned char u8;
typedef unsigned char uint8;
typedef unsigned int uint16;
typedef unsigned long uint32;
typedef char int8;
typedef int int16;
typedef long int32;
#include "stm32f10x.h"

#elif BOARD_INUSE == WIN32
#include <Windows.h>
typedef unsigned char u8;
typedef unsigned int u16;
typedef unsigned long u32;
typedef unsigned char uint8;
typedef unsigned int uint16;
typedef unsigned long uint32;
typedef char int8;
typedef int int16;
typedef long int32;
#define ENABLE 1
#define DISABLE 0
#define TRUE 1
#define FALSE 0
#define bool u8
#define BOOL u8
#define true 1
#define false 0
#define ON 1
#define OFF 0
#define OK 1
#endif

#endif